package com.sql;

import java.sql.Connection;
import java.sql.DriverManager;

public class Connect2DBFactory {
	public static Connection getDBConnection(){
		
		Connection connection=null;
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url="jdbc:mysql://localhost:3306/kh";
			String userString="root";
			String passwordString="gqb101112";
			connection=DriverManager.getConnection(url,userString,passwordString);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		return connection;
	}
	
}
